OpenClaw deployment¶
OpenClaw is a lightweight, highly extensible open-source AI agent orchestration platform designed for accessible agent deployment scenarios. Users can quickly build dedicated AI agents without complex development and deploy them on a range of hardware environments, including edge development boards, AI BOXes, and cloud servers.
Key features:
Lightweight deployment: No complex environment dependencies are required; the deployment process is simple, resource usage is low, and the platform supports a range of low-specification hardware environments.
Highly extensible design: Supports plug-in extensions and quick integration with channels such as Feishu to meet functional expansion needs in different scenarios.
Broad scenario compatibility: Compatible with a range of hardware environments, including edge development boards, AI BOXes, and cloud servers, meeting the needs of different deployment scenarios.
Easy to use: No professional development skills are required; agents can be built and debugged through wizard-based configuration and simple command-line operations.
Install OpenClaw¶
Update system dependencies and install the required tools¶
Run the following commands to update the system package sources and install basic tools such as curl and git, preparing the environment for subsequent installation:
sudo apt update
sudo apt install -y curl git ca-certificates build-essential jq
Install Node.js 22¶
OpenClaw officially requires Node.js in the runtime environment to be at least 22. Run the following commands to complete the installation:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
After installation, verify that the versions meet the requirements:
node -v # the expected output is v22.x.x or later
npm -v # the expected output is 10.x.x or later
Install OpenClaw¶
Install the latest version of OpenClaw globally through npm, then verify the installation:
sudo npm install -g openclaw@latest
openclaw --version
Note: Tips |
|---|
Installation usually takes 5–10 minutes, depending on the network download speed. |
Initialize OpenClaw¶
After the initial installation, you must complete the configuration wizard; otherwise, OpenClaw will not run properly. Run the following command to start the configuration wizard and install the gateway daemon:
openclaw onboard --install-daemon
The gateway daemon (a launchd/systemd user service) keeps OpenClaw running continuously in the background.
Configuration wizard steps screenshots (for reference):
On the installation confirmation screen, select Yes, and then press Enter.
In the Onboarding mode option, select QuickStart;
In the Model/auth provider option, select Qwen, and then press Enter.
Open the specified website, sign in to the qwen-code platform, and complete authentication.
After completing the configuration, restart the gateway for the settings to take effect:
openclaw gateway restart
Integrate with Feishu¶
Install the Feishu plug-in¶
Feishu plug-in repository: https://github.com/m1heng/clawdbot-feishu?tab=readme-ov-file#english
Run the following command to install the Feishu plug-in:
openclaw plugins install @m1heng-clawd/feishu
If the plug-in is already installed, use the following command to upgrade it to the latest version:
openclaw plugins update feishu
Create a Feishu app¶
Sign in to the Feishu Open Platform developer console:
Feishu (China): https://open.feishu.cn/app
Lark (international): https://open.larksuite.com/app
select enterprise self-built app and create an app.
Enter basic information such as the app name and description.
In the left navigation menu, open the App capabilities page, click Add app capabilities and enable Bot capability;
Open Credentials and basic information page, record and securely save the app’s AppID and App Secret; you will need them when configuring the plug-in.
Configure the plug-in¶
Run the following commands in the terminal. Replace appId and appSecret in the commands with the actual values obtained in the preceding steps to complete the basic Feishu plug-in configuration:
openclaw config set channels.feishu.enabled true --json
openclaw config set channels.feishu.appId "cli_xxxxx"
openclaw config set channels.feishu.appSecret "your_app_secret"
Configure permissions¶
In the Feishu Open Platform app console, open the Permission management page and configure the following permissions for the app, including required and optional permissions:
Required permissions
Permission |
Scope |
Description |
|---|---|---|
im:message |
Messages |
Send and receive messages |
im:message.p2p_msg:readonly |
Direct messages |
Read direct messages sent to the bot |
im:message.group_at_msg:readonly |
Group messages |
Receive messages that @mention the bot in groups |
im:message:send_as_bot |
Message sending |
Send messages as the bot |
im:resource |
Media resources |
Upload and download images or files |
Optional permissions
Permission |
Scope |
Description |
|---|---|---|
contact:user.base:readonly |
User information |
Obtain basic user information to resolve sender names and prevent different users in group or direct chats from being identified as the same speaker |
im:message.group_msg |
Group messages |
Read all group messages. This is a sensitive permission; configure it when requireMention:false must apply to group messages that do not @mention the bot |
im:message:readonly |
Message history |
Retrieve message history |
im:message:update |
Message editing |
Update or edit sent messages |
im:message:recall |
Message recall |
Recall sent messages |
im:message.reactions:read |
Emoji reactions |
View emoji reactions to messages |
Configure events and callbacks¶
In the Feishu Open Platform app console, open the Events and callbacks page and complete the following configuration:
Event configuration method
Receive events over a persistent connection: corresponding to connectionMode: “websocket”; this is recommended and does not require a public URL.
Receive events using a request URL — corresponding to connectionMode: “webhook”; a publicly accessible URL is required.Click Add event subscription and select the following required events:
Event |
Description |
|---|---|
im.message.receive_v1 |
Receive messages (required event) |
im.message.message_read_v1 |
Message-read receipts |
im.chat.member.bot.added_v1 |
Bot joins a group chat |
im.chat.member.bot.deleted_v1 |
Bot is removed from a group chat |
Publish and test¶
In the Feishu Open Platform app console, open the Version management and release page.
Create a new version and submit it for release review.
After the release is approved, you can find the app in the Feishu client and perform basic testing.
User permission approval and exception handling¶
When a Feishu user first chats with the bot, the system triggers a permission check and displays the corresponding pairing code in the chat interface. Run the following command in the terminal of the device where OpenClaw is deployed to approve the user’s permissions. After approval, the user can chat with the bot normally:
openclaw pairing approve feishu "Pairing code shown in the prompt"
OpenClaw feature demonstration¶
Run openclaw dashboard in the terminal to view the access address of OpenClaw’s web management page.